package com.java110.mall.market.bmo.community.impl;

import com.alibaba.fastjson.JSONObject;
import com.java110.dto.community.CommunityDto;
import com.java110.mall.market.bmo.community.IGetCommunityBMO;
import com.java110.utils.util.Assert;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("getCommunityBMOImpl")
public class GetCommunityBMOImpl implements IGetCommunityBMO {

//    @Autowired
//    private ICommunityInnerServiceSMO communityInnerServiceSMO;

    @Override
    public ResponseEntity<String> getCommunity(JSONObject paramIn) {
        CommunityDto communityDto = new CommunityDto();
        communityDto.setCommunityId(paramIn.getString("communityId"));
        List<CommunityDto> communityDtos = null;//communityInnerServiceSMO.queryCommunitys(communityDto);
        Assert.listOnlyOne(communityDtos,"未找到小区信息");
        return ResultVo.createResponseEntity(communityDtos.get(0));
    }

}
